﻿// Fill out your copyright notice in the Description page of Project Settings.


#include "Character/Core/Towers.h"

#include "Particles/ParticleSystemComponent.h"



ATowers::ATowers()
{
	PrimaryActorTick.bCanEverTick = true;

	ParticleMesh = CreateDefaultSubobject<UParticleSystemComponent>(TEXT("ParticleMesh"));
	StaticMeshBuilding = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("RangeBuildingMesh"));
	// DestructibleMeshBuilding = CreateDefaultSubobject<UDestructibleComponent>(TEXT("S"));

	ParticleMesh->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);
	StaticMeshBuilding->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);
	// DestructibleMeshBuilding->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepWorldTransform);
	
}


void ATowers::BeginPlay()
{
	Super::BeginPlay();
	
}

float ATowers::TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator,
	AActor* DamageCauser)
{
	return Super::TakeDamage(DamageAmount, DamageEvent, EventInstigator, DamageCauser);
}


void ATowers::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
}


void ATowers::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
	Super::SetupPlayerInputComponent(PlayerInputComponent);
}

